package com.wmm.factory;

import com.wmm.dao.StudentDao;
import com.wmm.dao.StudentDaoImp;
import com.wmm.dao.UserDao;
import com.wmm.dao.UserDaoImp;

public class DaoFactory {

    public DaoFactory() {
        System.out.println("11111");
    }

    /**
     * 通过静态工程方法模式来实现UserDao实现类对象的创建并返回
     * @return
     */
    public UserDao getUserDao() {
        return new UserDaoImp();
    }


    /**
     * 通过静态工程方法模式来实现StudentDao实现类对象的创建并返回
     * @return
     */
    public static StudentDao getStudentDao() {
        return new StudentDaoImp();
    }
}
